<!--卖车-->
<template>
  <div>
    <AlertModel :alert_show="AShow" :alert_text="AText"></AlertModel>
    <BackGoHome :thisTitle="msg"></BackGoHome>
    <div class="page_contents">
      <div class="sell_banner">
        <img src="/static/image/shl-3.png" alt="">
      </div>
      <div class="sell_from">
        <p class="sell_top_title">8884994<span>车主提交了卖车申请</span></p>
        <input type="text" placeholder="请输入手机号" id="phone" maxlength="11">
        <a @click.stop="S_from" class="yysell">预约卖车</a>
        <a class="mf_zx" @click.stop="Free_call">免费咨询</a>
      </div>
    </div>
    <Footers></Footers>
  </div>
</template>
<style>

</style>
<script>
  import BackGoHome from '../assembly/BackGoHome.vue'
  import Footers from '../assembly/footer_btn.vue'
  import AlertModel from '../assembly/alert_model.vue'
  export default{
    data(){
      return {
        msg: '我要卖车',
        AShow: false,
        AText: '',
      }
    },
    components: {
      Footers,
      BackGoHome,
      AlertModel
    },

    methods: {
      S_from: function () {
        var phone = document.getElementById('phone').value;
        if (!(/^1[34578]\d{9}$/.test(phone))) {
          let that = this
          that.AShow = true
          that.AText = '手机号码有误'
          setTimeout(function () {
            that.AShow = false
            $('#phone').val("")
          }, 1000)
          return true
        } else {
          alert('OK')
        }
      },
      Free_call: function () {
        window.location = 'tel:2222'
      }
    }
  }
</script>
